package com.zua.test;

import com.zua.ZuaMarketApplication;
import com.zua.entity.Order;
import com.zua.service.OrderService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.List;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = ZuaMarketApplication.class)
public class OrderTesrt {
    @Autowired
    private OrderService orderService;
    @Test
    public void testOrder(){
        List<Order> orders = orderService.selectAll(1, 5);
        for (int i = 0; i < orders.size(); i++) {
            System.out.println("orders = " + orders.get(i));
        }
    }
}
